package cn.jn.lhm.cms.handler;

import cn.jn.lhm.cms.entity.CrmBanner;
import cn.jn.lhm.cms.service.CrmService;
import cn.jn.lhm.utils.R;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author LHM
 * @Tips 热爱每一天，奋斗每一天
 * @date 2020/6/9 - 19:18
 */
@RestController
@RequestMapping("/cms/front")
public class BannerFrontHandler {

    @Resource
    private CrmService crmService;

    @GetMapping("/getAll")
    public R getAllBannerInfo(){
        List<CrmBanner> list = crmService.selectAllBannerInfo();
        return R.ok().data("data", list);
    }

}
